HTML code:Total number: The interface is as follows:JS Code:Calculate number of input mobile phone number, verify multi-number, filter duplicate number
Verify the implementation code of the bank card number in JavaScript, and verify the javascript code
1. Introduce jquery. js first
2. Introduce luhmCheck. js // Luhm verification of the bank card number.
3. See the following case:
Below is the js
Test card No:
1. 6222600810010710887
2. 6225881414207430
The above is t
Http://www.cnblogs.com/wuhuisheng/archive/2011/03/23/1992652.html
The main code for phone number verification is as follows:
Public bool istelephone (string str_telephone)
{
Return System. Text. regularexpressions. RegEx. ismatch (str_telephone, @ "^ (\ D {3, 4 }-)? \ D {6, 8} $ ");
}
The main code used to verify the mobile phone number is as follows:
Public boo
Java uses regular expressions for form validation tools class, can verify mailbox, mobile phone number, QQ number, etc.
Copy Code code as follows:
Package util;
Import Java.util.regex.Matcher;Import Java.util.regex.Pattern;
/*** Use regular expressions for form validation**/
public class Regexvalidateutil {Static Boolean flag = FALSE;static S
Recent projects used in the need to call the real-name authentication interface, real-name authentication interface price compared to SMS is not a bit higher than a few cents, so that the conditions of the call authentication is strict, so use to JS verify the true name and JS authentication ID number.
Get to the point.
1.js Verify real name
JS
This article mainly introduces the JS code to verify the phone number and phone number is legitimate, mobile phone number and phone number in some sites are required, in order to improve the user experience, the general to verify
Digital Judgment Method: isNaN () function
The test () method determines whether the string matches the contents of the regular expression, and returns a Boolean value (True/false)
Verify that the Chinese name
function ischinaname (name)
{var pattern =/^[\u4e00-\u9fa5]{1,6}$/;
return pattern.test (name);
//Verify the mobile number
function Isphoneno (p
PHP Extract the birthday date in the ID number and verify whether it is an adult function, ID number adult
PHP extracts the birthday date from the ID number and determines whether a function is adult. Can be determined at the same time 15-bit and 18-bit ID card, by my pro-test, very useful, share the function code as
1, verify whether it is a Chinese characterVerify that the nickname private Boolean verifynickname () {String nickname = Edt_username.gettext (). toString (); if (nickname = = NULL | | nickname.length () = = 0) {Edt_username.seterror ("cannot be empty"); return false; } int len = 0; char[] Nickchar = Nickname.tochararray (); for (int i = 0; i 2. Verify the phone
} $/
---------------------------------------------
JS Regular Expression verification indicates whether the input is a mobile phone number or phone number
First give the original link: http://www.cnblogs.com/cxy521/archive/2008/06/05/1214624.html
Verify the regular expression of the mobile phone number:/^(?:13\
It is not easy to write this function correctly, because there are many things to consider:
1) There may be spaces before and after the string, but spaces are not allowed in the middle.
2) There may be decimal places, 1.235, or. 3522.
3) There may be exponential forms, 2e10 2e-1 AND OTHER FORMS
Validate if a given string is Numeric.
Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueThere are many restrictions to consider whether the string is in the numerical form. Therefor
PHP Verify credit card number is correct function, PHP verify credit card number
You can use the following PHP functions to verify whether a card number is a credit card:
function Validatecard ($cardnumber) { $cardnumber = pre
Verify that the account is validVerification rules: a combination of letters, numbers, and underscores. It must start with a letter and contain 4-16 characters.
FunctionCheckuser (STR ){VaRRe=/^ [A-Za-Z] \ W {3, 15} $/;If(Re. Test (STR) {alert ("Correct");}Else{Alert ("Error") ;}} Checkuser ("jiade_cnblogs");//Call
Verify mobile phone numberVerification rules: 11-digit
/********************Function Name: Istelephonefunction function: fixed, mobile phone number check function, return True, reverse, return falsefunction parameters: obj, number to be checkedCheck rule:(1) Number, "(", ")" and "-"(2) The phone number is 3 to 8 digits(3) If the phone
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.